package com.lucas.provider;

import com.lucas.service.DubboRpcTestService;
import com.lucas.service.HelloService;
import org.apache.dubbo.common.extension.ExtensionLoader;
import org.apache.dubbo.config.annotation.Service;

@Service
public class ProviderServiceImpl implements DubboRpcTestService {
    @Override
    public String rpcTestMethod(String name) {
        String str="rpcTestMethod 接受信息"+name;
        System.out.println("服务端:"+ str);
        ExtensionLoader<HelloService> extensionLoader = ExtensionLoader.getExtensionLoader(HelloService.class);
        HelloService extension = extensionLoader.getExtension(name);
        extension.sayHello(name);
        return str;
    }
}
